package com.jzo2o.health.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jzo2o.api.trade.enums.PayChannelEnum;
import com.jzo2o.common.model.msg.TradeStatusMsg;
import com.jzo2o.health.model.domain.Orders;
import com.jzo2o.health.model.dto.request.PlaceOrderReqDTO;
import com.jzo2o.health.model.dto.response.OrdersPayResDTO;
import com.jzo2o.health.model.dto.response.PlaceOrderResDTO;

/**
 * 下单服务类
 */
public interface IOrdersCreateService extends IService<Orders> {
    /**
     * 预约下单
     * @param placeOrderReqDTO
     * @return
     */
    PlaceOrderResDTO placeOrder(PlaceOrderReqDTO placeOrderReqDTO);

    /**
     * 支付成功后更新订单状态
     * 下单支付
     * @param id
     * @param tradingChannel
     * @return
     */
    OrdersPayResDTO pay(Long id, PayChannelEnum tradingChannel);

    /**
     * 查询支付结果
     * @param id 业务订单id
     * @return
     */
    OrdersPayResDTO payResult(Long id);

    /**
     * 支付成功后修改订单状态
     * @param tradeStatusMsg
     */
    void paySuccess(TradeStatusMsg tradeStatusMsg);
}
